/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package biofilter.records;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author qvh
 */
public class Mapper454RecordTest {

    public Mapper454RecordTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    private String line = ">F5ZOH0Y01EB1G8, 1..83 of 83 and CP000568, 2873000..2873084 of 3843301   (83/85 ident)\n";
    /**
     * Test of get method, of class Mapper454Record.
     */
    @Test
    public void testGet() {
        System.out.println("get/set");
        Mapper454Record instance = new Mapper454Record();
        String expResult = line;
        instance.set(line);
        String result = instance.get();
        assertEquals(expResult, result);
    }

    /**
     * Test of getStart method, of class Mapper454Record.
     */
    @Test
    public void testGetStart() {
        System.out.println("getStart");
        Mapper454Record instance = new Mapper454Record();
        int expResult = 2873000;
        instance.set(line);
        int result = instance.getStart();
        assertEquals(expResult, result);
    }

    /**
     * Test of getEnd method, of class Mapper454Record.
     */
    @Test
    public void testGetEnd() {
        System.out.println("getEnd");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        int expResult = 2873084;
        int result = instance.getEnd();
        assertEquals(expResult, result);
    }

    /**
     * Test of length method, of class Mapper454Record.
     */
    @Test
    public void testLength() {
        System.out.println("length");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        int expResult = 85;
        int result = instance.length();
        assertEquals(expResult, result);
    }

    /**
     * Test of getStrand method, of class Mapper454Record.
     */
    @Test
    public void testGetStrand() {
        System.out.println("getStrand");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        char expResult = '+';
        char result = instance.getStrand();
        assertEquals(expResult, result);
    }

    /**
     * Test of getWeight method, of class Mapper454Record.
     */
    @Test
    public void testGetWeight() {
        System.out.println("getWeight");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        double expResult = 0.9764705882352941;
        double result = instance.getWeight();
        assertEquals(expResult, result, 0.0);
    }

    /**
     * Test of getQueryID method, of class Mapper454Record.
     */
    @Test
    public void testGetQueryID() {
        System.out.println("getQueryID");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        String expResult = ">F5ZOH0Y01EB1G8";
        String result = instance.getQueryID();
        assertEquals(expResult, result);
    }

    /**
     * Test of getSubjectID method, of class Mapper454Record.
     */
    @Test
    public void testGetSubjectID() {
        System.out.println("getSubjectID");
        Mapper454Record instance = new Mapper454Record();
        instance.set(line);
        String expResult = "CP000568";
        String result = instance.getSubjectID();
        assertEquals(expResult, result);
    }

}